﻿using LogisticsMSDAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LogisticsMSBLL
{
    public class UserBLL
    {
        public string RegUser(string account, string tel, string pwd)
        {
            UserDAL userDAL = new UserDAL();
            string msg;
            if (userDAL.IsAccount(account))
            {
                if (userDAL.IsTel(tel))//手机号不重复
                {
                    if (userDAL.RegUser(account, tel, pwd))//成功
                    {
                        msg = "成功";
                    }
                    else
                    {
                        msg = "失败";
                    }
                }
                else
                {
                    msg = "手机号重复";
                }
            }
            else
            {
                msg = "账号重复";
            }
            return msg;
        }
    }
}
